<?php
$dir_handle = opendir(dirname(__FILE__).'/tmp/');
while ($dir_content = readdir($dir_handle)) {
    if ($dir_content{0} == '.') continue; // we do not parse hidden files
    unlink(dirname(__FILE__).'/tmp/'.$dir_content);
}
closedir($dir_handle);
